///*
// * To change this template, choose Tools | Templates
// * and open the template in the editor.
// */
//
//package com.library.forms;
//import java.util.ArrayList;
//
///**
// *
// * @author mAbraha
// */
//public class TestClass {
//    
//    public static void main(String[] args)
//    {
//    //----------------------Make a Loan--------------------------------------
//    //Book(String title,String isbn,String author, String date, String pubCompany)
//    //To make a loan create a member, then a copy pass it and get done
//    //to create a copy you need Publication and pass it to loan;  
//      Member myMember=new Member("Meron","Abraham","waco,Texas","343-333-9383");
//      Publication myBook=new Book("The Good Earth","383-393-8393","David Hood","12-12-2020","The RedSea Publisher",4);
//      Publication myBook2=new Book("Love and Shadow","343-393-8393","Amir Hood","12-12-2020","The RedSea Publisher",4);
//     ArrayList<Copy> myCopyList=new ArrayList<Copy>();
//    Copy myCopy=new Copy(4848,myBook);
//    Copy myCopy2=new Copy(8398,myBook2);
//     
//     myCopy.setMyPub(myBook);
//     myCopy2.setMyPub(myBook2);
//     myCopyList.add(myCopy);
//     myCopyList.add(myCopy2);
//     System.out.println("check"+isAvailable("The Earth",myCopyList));
//     Loan myLoan=new Loan("12-12-200","12-12-12",myMember);
//     myLoan.setMyCopy(myCopy);
//     myLoan.setMyCopy(myCopy2);
//     myLoan.print();
//    // System.out.println("There are some changes");
//    //------------------------------------------------------------------------------
//    //----- ------------------------Make a Reservation-----------------------------
//    //Create a member and a publication and reserve it,
//     //Publication publication1=new Publication("Core Java","12-12-2012","")
//    ArrayList<Reservation> myReservation=new ArrayList<Reservation>();     
//    //Reservation myReservation=new Reservation(myMember);
//                myReservation.add(new Reservation(myMember));
//                myReservation.get(myReservation.size()-1).setMyPublication(myBook);
//        }
//    
//    public static boolean isAvailable(String title,ArrayList<Copy> listCopy)
//    {
//        boolean av=false;
//    for(Copy copy:listCopy)
//    {
//        
//        
//        
//        
//     if(title.equals(copy.getMyPub().getTitle()))
//     {
//      if(copy.isIsAvailable())
//          return true;
//     
//     }
//    }
//    
//  return av;  
//    
//    
//    
//    }
//    
//    
//    
//    
//}
